package leetcode.bit;

public class Test2 {
    public static void main(String[] args) {
        System.out.println(minChanges(13, 4));
    }

    public static int minChanges(int n, int k) {
        if ((n & k) != k) {
            return -1;
        }
        return Integer.bitCount(n ^ k);
    }
}
